package cn.ecnu.pojo.resume;

import cn.ecnu.common.validated.InsertGroup;
import cn.ecnu.common.validated.UpdateGroup;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

@Data
@TableName(value = "resume_extra")
/*求职者-在校经历 */
public class ResumeExtra {

    @TableId(value = "extra_id", type = IdType.AUTO)
//    @Null(message = "数据添加时，extraId不能赋值",groups = InsertGroup.class)
//    @NotNull(message = "数据更新时，extraId不能为空",groups = UpdateGroup.class)
    private Integer extraId;

    @NotNull(message = "userId不能为空")
    private Integer userId;

    @NotBlank(message = "课外经历名称不能为空")
    private String extraName;

    private String extraDetail;

    @Override
    public String toString() {
        return "{" +
                "经历名称:'" + extraName +
                ", 详情:'" + extraDetail +
                '}';
    }
}
